{% extends "app/base_site.html" %}

{% block title %} Profile {% endblock title %}

{% block stylesheets %}
  {{ block.super }}
{% endblock stylesheets %}

{% block content %}
  <div class="right_col" role="main">
    <div class="">
      <div class="page-title">
        <div class="title_left">
          <h3>菜单权限设置</h3>
        </div>
      </div>

      <div class="clearfix"></div>

      <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div class="x_panel">
            <div class="x_content">

                <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left"
                      action="permission.html" method="post">

                <div class="form-group">
                  <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">用户名:<span class="required">*</span>
                  </label>
                  <div class="col-md-6 col-sm-6 col-xs-12">
                    <select id="heard" class="form-control" required name="user_id">
                      <option value="0">针对全部用户</option>
                      {% for user in users %}
                         <option value="{{ user.id }}">{{ user.username }}</option>
                      {% endfor %}
                    </select>
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">菜单:<span class="required">*</span>
                  </label>
                  <div class="col-md-6 col-sm-6 col-xs-12">
                    <div>
                        <div>
                          <label>
                                <input type="checkbox" {% if up.adv1 == "on" %} checked {% endif %} name="adv1">
                                广告位1日收益
                          </label>
                        </div>
                    </div>
                    <div>
                        <div >
                          <label>
                                <input type="checkbox" {% if up.adv2 == "on" %} checked {% endif %} name="adv2">
                                广告位2日收益
                          </label>
                        </div>
                    </div>
                    <div>
                        <div>
                          <label>
                                <input type="checkbox" {% if up.adv1 == "on" %} checked {% endif %} name="adv3">
                                广告位1月报表
                          </label>
                        </div>
                    </div>
                    <div>
                        <div >
                          <label>
                                <input type="checkbox" {% if up.adv2 == "on" %} checked {% endif %} name="adv4">
                                广告位2月报表
                          </label>
                        </div>
                    </div>

                  </div>
                </div>
                <div class="ln_solid"></div>
                <div class="form-group">
                  <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                    <button type="submit" class="btn btn-success">设置权限</button>
                  </div>
                </div>

              </form>

            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
{% endblock content %}

{% block javascripts %}
  {{ block.super }}
  <!-- morris.js -->
  <script src="/static/vendors/raphael/raphael.min.js"></script>
  <script src="/static/vendors/morris.js/morris.min.js"></script>
{% endblock javascripts %}